package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.TravelLike;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelLikeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TravelLike record);

    TravelLike selectByPrimaryKey(Integer id);

    List<TravelLike> selectAll();

    int updateByPrimaryKey(TravelLike record);

    void deleteByInfo(TravelLike travelLike);

    TravelLike selectByInfo(TravelLike travelLike);


    int selectTravelLikeNum(@Param("id") Long id, @Param("isRead") boolean isRead);

    void updateLikeIsRead(@Param("travelIds") List<Long> travelIds, @Param("isRead") boolean isRead);

    List<Long> selectTravelIdByAuthorId(Long athorId);

    List<TravelLike> selectTravelLikeInfo(QueryObject qo);
}